Perceptually-aware Online Per-title Encoding for Live Video Streaming

ABSTRACT

Techniques for implementing perceptually aware per-title encoding may include receiving an input video, a set of resolutions, a maximum target bitrate and a minimum target bitrate, extracting content aware features for each segment of the input video, predicting a perceptually aware bitrate-resolution pair for each segment using a model configured to optimize for a quality metric using constants trained for each of the set of resolutions, generating a target encoding set including a set of perceptually aware bitrate-resolution pairs, and encoding the target encoding set. The content aware features may include a spatial energy feature and an average temporal energy. According to these methods only a subset of bitrates and resolutions, less than a full set of bitrates and resolutions, are encoded to provide high quality video content for streaming.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Patent Application No. 63/336,136 entitled “Perceptually-aware Online Per-title Encoding for Live Video Streaming,” filed Apr. 28, 2022, the contents of which are hereby incorporated by reference in their entirety.

BACKGROUND OF INVENTION

The current state of per-title encoding for live video streaming uses a fixed resolution-bitrate ladder to avoid additional encoding time complexity involved with finding optimum resolution-bitrate pairs for every video content. By contrast, in Video on Demand (VoD) applications, the same video content is encoded at various bitrates and spatial resolutions to find an optimal bitrate ladder for each video content.

HTTP Adaptive Streaming (HAS) continues to grow and has become the de facto standard in recent years for delivering video over the Internet. In HAS, each video is encoded at a set of bitrate-resolution pairs, referred to as a bitrate ladder. Traditionally a fixed bitrate ladder (e.g., HTTP Live Streaming (HLS) bitrate ladder) is used for all video content. To improve on this “one-size-fits-all” approach to account for the vast diversity in video content characteristics and network conditions, bitrate ladders can be optimized per title to increase the Quality of Experience (QoE).

Per-title encoding schemes are based on the premise that each resolution performs better than others in a specific region for a given bitrate range, and these regions depend on the video content. FIG. 1 shows a chart 100 of Rate-Distortion (RD) curves using video multi-method assessment fusion (VMAF) as the quality metric for a first video sequence and a second video sequence from prior art datasets, the RD curves resulting from encoding at 540 p (i.e., RD curves 104 and 108) and 1080p (i.e., RD curves 102 and 106) resolutions for the bitrates shown. As shown in chart 100, for the first video sequence, the cross-over bitrate between 540p and 1080p resolutions happens at approximately b₁=1.2 Mbps, which means at bitrates lower than b₁, 540 p resolution outperforms 1080p, while at bitrates higher than b₁, 1080 p resolution outperforms 540p. On the other hand, for the second video sequence, 1080p remains superior at the entire bitrate range, which manes 1080p should be selected for the bitrate ladder for the entire bitrate range. This content-dependency to select the optimal bitrate-resolution pairs is the basis for introducing per-title encoding. Each video segment is encoded at several quality levels in this scheme, and bitrate resolution pairs per each quality level and convex-hull is determined. The bitrate-resolution pair with the highest quality (i.e., closer to the convex-hull) is selected for each quality level. For example, bitrate-quality pairs are shown in FIG. 2 by dotted curves 202-212 for a third video sequence encoded at a set of bitrates and resolutions. In chart 200, the third video sequence has been encoded at a set of bitrates and resolutions to determine the convex-hull (e.g., outline around curves 202-212). For each requested bitrate, the resolution with bitrate-quality pair closer to the convex-hull is selected for the bitrate ladder.

Though per-title encoding enhances the quality of video delivery, determining convex-hull is computationally expensive, making it suitable for VoD streaming applications, but not for live video streaming. Some methods have been developed to pre-analyze video content to avoid a brute force encoding of all bitrate-resolution pairs. Content-gnostic methods employ machine learning to find a bitrate range for each resolution that outperforms other resolutions, and a Random Forest (RF) classifier can be used to decide which encoding resolution is best suited for different quality ranges and to study machine learning based adaptive resolution prediction. However, these approaches still yield latency much higher than the accepted latency for live streaming.

Therefore, a low-latency perceptually aware online per-title encoding is desirable for live video streaming.

BRIEF SUMMARY

The present disclosure provides techniques for perceptually aware online per-title encoding for live video streaming. A method for perceptually aware per-title encoding may include: receiving an input video, a set of resolutions, a maximum target bitrate and a minimum target bitrate; extracting two or more features for each of a plurality of segments of the input video, the two or more features comprising a spatial energy feature and an average temporal energy; predicting a perceptually aware bitrate-resolution pair for the each of the plurality of segments using a model, the perceptually aware bitrate-resolution pair being based on the spatial energy feature and the average temporal energy, the model being configured to optimize for a quality metric using constants trained for each resolution; generating a target encoding set comprising a set of perceptually aware bitrate-resolution pairs; and encoding the target encoding set.

In some examples, the set of perceptually aware bitrate-resolution pairs comprises fewer pairs than resolutions in the set of resolutions. In some examples, the set of perceptually aware bitrate-resolution pairs comprises fewer pairs than a number of bitrates from the maximum target bitrate to the minimum target bitrate. In some examples, the perceptually aware bitrate-resolution pair is predicted based on a just noticeable difference (JND) quality value. In some examples, the two or more features are extracted using a Discrete Cosine Transform (DCT)-energy function. In some examples, exponentially higher costs are assigned to higher DCT frequencies. In some examples, the two or more features comprise low-complexity features. In some examples, the average temporal energy is computed by comparing the blockwise sum of absolute differences (SAD) of the texture energy of each frame in a given segment of the plurality of segments to the blockwise SAD of a previous frame in the given segment. In some examples, the quality metric comprises video multi-method assessment fusion (VMAF). In some examples, the constants trained for each resolution are trained using a linear regression approach. In some examples, predicting the perceptually aware bitrate-resolution pair comprises implementing a machine learning model. In some examples, the encoding the target encoding set comprises online per-title encoding.

In some examples, the method also includes receiving as input one, or a combination, of a peak bitrate, a maximum buffer size, and a maximum segment length. In some examples, the method also includes scaling the encoded target encoding set for display.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a chart illustrating exemplary Rate-Distortion curves resulting from encoding video sequences using prior art methods.

FIG. 2 is a chart illustrating Rate-Distortion curves resulting from encoding a video sequence at a set of bitrates and resolutions using prior art methods.

FIG. 3 is a simplified block diagram of an exemplary perceptually aware per-title encoding framework, in accordance with one or more embodiments.

FIG. 4 is a flow chart illustrating an exemplary method for perceptually aware per-title encoding, in accordance with one or more embodiments.

FIG. 5A is a simplified block diagram of an exemplary computing system configured to implement the framework illustrated in FIG. 3 and perform steps of the method illustrated in FIG. 4 , in accordance with one or more embodiments.

FIG. 5B is a simplified block diagram of an exemplary distributed computing system implemented by a plurality of computing devices, in accordance with one or more embodiments.

FIGS. 6A-6D are charts illustrating Rate-Distortion curves resulting from encoding video sequences using perceptually aware per-title encoding as compared with prior art methods.

The figures depict various example embodiments of the present disclosure for purposes of illustration only. One of ordinary skill in the art will readily recognize from the following discussion that other example embodiments based on alternative structures and methods may be implemented without departing from the principles of this disclosure, and which are encompassed within the scope of this disclosure.

DETAILED DESCRIPTION

The Figures and the following description describe certain embodiments by way of illustration only. One of ordinary skill in the art will readily recognize from the following description that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles described herein. Reference will now be made in detail to several embodiments, examples of which are illustrated in the accompanying figures.

The above and other needs are met by the disclosed methods, a non-transitory computer-readable storage medium storing executable code, and systems for perceptually aware online per-title encoding.

In this invention, a low-latency perceptually aware online per-title encoding scheme that improves bitrate ladders for live video streaming applications without any noticeable additional latency. Content-aware features may comprise Discrete Cosine Transform (DCT)-energy-based low-complexity spatial and temporal features extracted to determine video segment characteristics. Based on said content-aware features, a low-complexity convex-hull prediction algorithm may be used to predict an optimum bitrate-resolution for each video segment based on a just noticeable difference (JND) in quality perception.

While specific examples have been provided above, it is understood that the present invention can be applied with a wide variety of inputs, thresholds, ranges, and other factors, depending on the application. For example, the time frames and ranges provided above are illustrative, but one of ordinary skill in the art would understand that these time frames and ranges may be varied or even be dynamic and variable, depending on the implementation.

FIG. 3 is a simplified block diagram of an exemplary perceptually aware per-title encoding framework, in accordance with one or more embodiments. Framework 300 includes input video 302, convex-hull prediction module 304, encoding set generation module 306, and online per-title encoding module 308. Input video 302 may be split into multiple segments 303. Convex-hull prediction module 304 may be configured to predict a convex-hull for each of segments 303 using spatial and temporal features of said each of segments 303. In some examples, convex-hull prediction module 304 also may predict the convex-hull for each of segments 303 using a set of pre-defined resolutions (R), maximum and minimum target bitrates (b_(max) and b_(min), respectively), and average JND quality (v_(j)) of the bitrate ladder. Target encoding set 307 may be generated by encoding set generation module 306 based on predicted bitrate-resolution (r, b) pairs 305. In some examples, encoding is carried out by online per-title encoding 308 on target encoding set 307, comprising the predicted bitrate-resolution pairs 305 for each segment, without the need to encode other or all bitrates and resolutions. For example, predicted bitrate-resolution pairs 305 comprise fewer pairs than there are resolutions in the set of resolutions and/or set of target bitrates (e.g., from maximum to minimum target bitrates). In some examples, convex-hull prediction module 304 may comprise, and may be configured to implement, a neural network or other machine learning (ML) model. In other examples, convex-hull prediction module 304 may be configured to implement a different (e.g., non-ML) model.

Convex-hull prediction module 304 may be configured to perform feature extraction and bitrate prediction. For live streaming applications, selecting low-complexity features is helpful to ensure low-latency video streaming without disruption. For a given video segment (e.g., one of segments 303), two or more features may be calculated, including an average texture energy and an average gradient of the texture energy. In an example, a DCT-based energy function may be used to determine the block-wise texture of each frame:

$H_{p,k} = {\sum\limits_{i = 0}^{w - 1}{\underset{j = 0}{\overset{w - 1}{\sum}}{e{❘{\left( \frac{ij}{w^{2}} \right)^{2} - 1}❘}{❘{{DCT}\left( {{i - 1},{j - 1}} \right)}❘}}}}$

Frame p has a block address k, and the block size is w×w pixels (e.g., 32×32 pixels, 64×64 pixels, or larger or smaller). In other examples, the block size may have a width w and a height/length λ, and the energy function may be a function of w×λ instead of w². DCT(i,j) is the (i,j)^(th) DCT component when i+j>0, and otherwise it is 0. Exponentially higher costs are assigned to higher DCT frequencies (e.g., caused by a mixture of objects). The texture is averaged to determine the spatial energy feature denoted as E:

$E = {\sum\limits_{p = 0}^{P - 1}{\underset{k - 0}{\overset{C - 1}{\sum}}\frac{H_{p,k}}{P*C*w^{2}}}}$

In this function, C represents the number of blocks per frame, and P denotes a number of frames in the segment. The blockwise SAD (i.e., sum of absolute differences) of the texture energy of each frame compared to its previous frame may be computed and averaged for each frame of the video to obtain an average temporal energy h:

$h = {\sum\limits_{p = 1}^{P - 1}{\underset{k = 0}{\overset{C - 1}{\sum}}\frac{SA{D\left( {H_{p,k},H_{{p - 1},k}} \right)}}{\left( {P - 1} \right)*C*w^{2}}}}$

Convex-hull prediction module 304 also may be configured to predict a bitrate-resolution pair for each of segments 303 using the above-described extracted features. There is a significant correlation between VMAF and

$\log\left( \frac{h*b}{E} \right)$

for every resolution (e.g., Pearson Correlation). Thus, VMAF for a resolution r and target bitrate b may be modelled as:

$v_{r,p} = {A_{0,r}\log\left( {\sqrt{\left. {\frac{h}{E}*b_{0}^{2}} \right)} + A_{1,r}} \right.}$

In this function, A_(0,r) and A_(1,r) are constants defined for each resolution r. Such constants may be trained using a linear regression approach. A target bitrate for each resolution r to achieve VMAF v_(t) (b_(r,v)) may be determined by:

$b_{r,v_{t}} = \sqrt{\sqrt{\frac{E}{h}}e\left( \frac{v_{t} - A_{1,r}}{A_{0,r}} \right)}$

Once trained, a perceptually aware bitrate ladder for any video segment may be predicted using the input maximum and minimum target bitrates (b_(max) and b_(min), respectively), set of resolutions (R), average or target JND quality (v_(j)), and extracted E and h features, as shown in Algorithm 1 below.

Algorithm 1: Bitrate ladder prediction algorithm   Inputs:  b_(min), b_(max): minimum and maximum target bitrate  R: set of all resolutions r  v_(J): average (target) JND function Output: (r, b) pairs of the bitrate ladder Step 1: b₀ = b_(min)    $v_{r,b_{0}} = {{A_{0,r}{\log\left( {\sqrt{\frac{h}{E}} \cdot b_{0}^{2}} \right)}} + A_{1,r}}$   v₀ = max(v_(r,b) ₀ )   r₀ = arg max_(r∈R)(v_(r,b) ₀ ) (r₀, b₀) is the first point of the bitrate ladder Step 2:  t = 1  for t ≥ 1 do  |  v_(t) = v_(t−1) + v_(J)(v_(t−1))  |   $b_{r,v_{t}} = \sqrt{\sqrt{\frac{E}{h}}e^{(\frac{v_{t} - A_{1,r}}{A_{0,r}})}}$  |  b_(t) = min(b_(r,v) _(t) )  |  r_(t) = arg min_(r∈R)(b_(r,v) _(t) )  |  if b_(t) > b_(max) or v_(t) > v_(max) then  |  └ End of the algorithm  |  else  |  | (r_(l), b_(t)) is the (t + 1)^(th) point of the bitrate  |  | ladder.  |  └ t = t + 1  └

FIG. 4 is a flow chart illustrating an exemplary method for perceptually aware per-title encoding, in accordance with one or more embodiments. Method 400 may begin with receiving an input video at step 402. In some examples, the input video may be split into a plurality of segments. In some examples, one or a combination of a set of resolutions, a maximum target bitrate and a minimum target bitrate also may be received. At step 404, two or more features may be extracted for a segment of the input video (e.g., one of the plurality of segments), the two or more features including at least a spatial energy feature and an average temporal energy. A bitrate-resolution pair for the segment may be predicted (e.g., by convex-hull prediction module 304) using a model at step 406, the bitrate-resolution pair being based on the spatial energy feature and the average temporal energy. In some examples, the model may be configured to optimize for a quality metric using constants trained for each resolution in the set of resolutions, as described herein. In some examples, a target encoding set may be generated (e.g., by encoding set generation module 306) comprising the bitrate resolution pair for the segment. The bitrate resolution pair for the segment, or the target encoding set comprising a set of bitrate-resolution pairs, may be encoded at step 408 (e.g., by online per-title encoding module 308). In an example, encodings may be generated using ×265 v3.5 (e.g., with a fast, faster, veryfast, superfast, or other encoding speed preset). In some examples, a video buffer model or mode may be implemented to ensure correct buffering of encoded video stream. In some examples, a peak bitrate may be predetermined (e.g., 110% or other peak bitrate given by a content provider) with a maximum buffer size set to a magnitude of the peak bitrate (e.g., 300% or other maximum buffer size given by a content provider), as well as a maximum segment length (e.g., one second, two seconds, several seconds, tens of seconds, or other suitable length). In some examples, encoded content may be scaled to a higher resolution for display.

FIG. 5A is a simplified block diagram of an exemplary computing system configured to implement the framework illustrated in FIG. 3 and perform steps of the method illustrated in FIG. 4 , in accordance with one or more embodiments. In one embodiment, computing system 500 may include computing device 501 and storage system 520. Storage system 520 may comprise a plurality of repositories and/or other forms of data storage, and it also may be in communication with computing device 501. In another embodiment, storage system 520, which may comprise a plurality of repositories, may be housed in one or more of computing device 501. In some examples, storage system 520 may store networks, video data, bitrate ladders, bitrate-resolution pairs, target encoding sets, metadata, instructions, programs, and other various types of information as described herein. This information may be retrieved or otherwise accessed by one or more computing devices, such as computing device 501, in order to perform some or all of the features described herein. Storage system 520 may comprise any type of computer storage, such as a hard drive, memory card, ROM, RAM, DVD, CD-ROM, write-capable, and read-only memories. In addition, storage system 520 may include a distributed storage system where data is stored on a plurality of different storage devices, which may be physically located at the same or different geographic locations (e.g., in a distributed computing system such as system 550 in FIG. 5B). Storage system 520 may be networked to computing device 501 directly using wired connections and/or wireless connections. Such network may include various configurations and protocols, including short range communication protocols such as Bluetooth™, Bluetooth™ LE, the Internet, World Wide Web, intranets, virtual private networks, wide area networks, local networks, private networks using communication protocols proprietary to one or more companies, Ethernet, WiFi and HTTP, and various combinations of the foregoing. Such communication may be facilitated by any device capable of transmitting data to and from other computing devices, such as modems and wireless interfaces.

Computing device 501, which in some examples may be included in mobile device 501 and in other examples may be included in a server (e.g., dual-processor server), also may include a memory 502. Memory 502 may comprise a storage system configured to store a database 514 and an application 516. Application 516 may include instructions which, when executed by a processor 504, cause computing device 501 to perform various steps and/or functions (e.g., implementing a convex-hull prediction algorithm and other aspects of a perceptually aware per-title encoding), as described herein. Application 516 further includes instructions for generating a user interface 518 (e.g., graphical user interface (GUI)). Database 514 may store various algorithms and/or data, including neural networks (e.g., convolutional neural networks) and data regarding bitrates, videos, video segments, bitrate-resolution pairs, target encoding sets, device characteristics, network performance, among other types of data. Memory 502 may include any non-transitory computer-readable storage medium for storing data and/or software that is executable by processor 504, and/or any other medium which may be used to store information that may be accessed by processor 504 to control the operation of computing device 501.

Computing device 501 may further include a display 506, a network interface 508, an input device 510, and/or an output module 512. Display 506 may be any display device by means of which computing device 501 may output and/or display data (e.g., to play decoded video). Network interface 508 may be configured to connect to a network using any of the wired and wireless short range communication protocols described above, as well as a cellular data network, a satellite network, free space optical network and/or the Internet. Input device 510 may be a mouse, keyboard, touch screen, voice interface, and/or any or other hand-held controller or device or interface by means of which a user may interact with computing device 501. Output module 512 may be a bus, port, and/or other interfaces by means of which computing device 501 may connect to and/or output data to other devices and/or peripherals.

In one embodiment, computing device 501 is a data center or other control facility (e.g., configured to run a distributed computing system as described herein), and may communicate with a media playback device. As described herein, system 500, and particularly computing device 501, may be used for video playback, running an application, encoding and decoding video data, providing feedback to a server, and otherwise implementing steps in a perceptually aware per-title encoding method, as described herein. Various configurations of system 500 are envisioned, and various steps and/or functions of the processes described below may be shared among the various devices of system 500 or may be assigned to specific devices.

FIG. 5B is a simplified block diagram of an exemplary distributed computing system implemented by a plurality of computing devices, in accordance with one or more embodiments. System 550 may comprise two or more computing devices 501 a-n. In some examples, each of 501 a-n may comprise one or more of processors 504 a-n, respectively, and one or more of memory 502 a-n, respectively. Processors 504 a-n may function similarly to processor 504 in FIG. 5A, as described above. Memory 502 a-n may function similarly to memory 502 in FIG. 5A, as described above.

FIGS. 6A-6D are charts illustrating Rate-Distortion (RD) curves resulting from encoding video sequences using perceptually aware per-title encoding as compared with prior art methods. In FIG. 6A, results curve 604 show that encodings of a first video sequence using a perceptually aware per-title encoding method, as described herein, yield the same or better (e.g., higher) VMAF as compared to results curve 602 using a prior art encoding scheme (e.g., HLS ladder). Similarly, results curves 614, 624, and 634 show that encodings of a second, third, and fourth video sequences, respectively, yield the same or better VMAF as compared to results curves 612, 622, and 632 using a prior art encoding scheme. The average difference between VMAFs of consecutive RD points along curves 604, 614, 624, and 634 indicates the input (i.e., target) JND values for those video sequences, respectively.

As those skilled in the art will understand, a number of variations may be made in the disclosed embodiments, all without departing from the scope of the invention, which is defined solely by the appended claims. It should be noted that although the features and elements are described in particular combinations, each feature or element can be used alone without other features and elements or in various combinations with or without other features and elements. The methods or flow charts provided may be implemented in a computer program, software, or firmware tangibly embodied in a computer-readable storage medium for execution by a general-purpose computer or processor.

Examples of computer-readable storage mediums include a read only memory (ROM), random-access memory (RAM), a register, cache memory, semiconductor memory devices, magnetic media such as internal hard disks and removable disks, magneto-optical media, and optical media such as CD-ROM disks.

Suitable processors include, by way of example, a general-purpose processor, a special purpose processor, a conventional processor, a digital signal processor (DSP), a plurality of microprocessors, one or more microprocessors in association with a DSP core, a controller, a microcontroller, Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) circuits, any other type of integrated circuit (IC), a state machine, or any combination of thereof. 

What is claimed is:
 1. A method for perceptually aware per-title encoding, the method comprising: receiving an input video, a set of resolutions, a maximum target bitrate and a minimum target bitrate; extracting two or more features for each of a plurality of segments of the input video, the two or more features comprising a spatial energy feature and an average temporal energy; predicting a perceptually aware bitrate-resolution pair for the each of the plurality of segments using a model, the perceptually aware bitrate-resolution pair being based on the spatial energy feature and the average temporal energy, the model being configured to optimize for a quality metric using constants trained for each resolution in the set of resolutions; generating a target encoding set comprising a set of perceptually aware bitrate-resolution pairs; and encoding the target encoding set.
 2. The method of claim 1, wherein the set of perceptually aware bitrate-resolution pairs comprises fewer pairs than a number of resolutions in the set of resolutions.
 3. The method of claim 1, wherein the set of perceptually aware bitrate-resolution pairs comprises fewer pairs than a number of bitrates from the maximum target bitrate to the minimum target bitrate.
 4. The method of claim 1, wherein the perceptually aware bitrate-resolution pair is predicted based on a just noticeable difference (JND) quality value.
 5. The method of claim 1, wherein the two or more features are extracted using a Discrete Cosine Transform (DCT)-energy function.
 6. The method of claim 5, wherein exponentially higher costs are assigned to higher DCT frequencies.
 7. The method of claim 1, wherein the two or more features comprise low-complexity features.
 8. The method of claim 1, wherein the average temporal energy is computed by comparing the blockwise sum of absolute differences (SAD) of the texture energy of each frame in a given segment of the plurality of segments to the blockwise SAD of a previous frame in the given segment.
 9. The method of claim 1, wherein the quality metric comprises video multi-method assessment fusion (VMAF).
 10. The method of claim 1, wherein the constants trained for each resolution are trained using a linear regression approach.
 11. The method of claim 1, wherein predicting the perceptually aware bitrate-resolution pair comprises implementing a machine learning model.
 12. The method of claim 1, wherein the encoding the target encoding set comprises online per-title encoding.
 13. The method of claim 1, further comprising receiving as input one, or a combination, of a peak bitrate, a maximum buffer size, and a maximum segment length.
 14. The method of claim 1, further comprising scaling the encoded target encoding set for display. 